package com.cykj.controller;

import com.cykj.dto.ResponseDto;
import com.cykj.service.ConsultantService;
import com.cykj.vo.BookingVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: Psychology
 * @BelongsPackage: com.cykj.controller
 * @Author: 小林
 * @CreateTime: 2025-02-10 15:27
 * @Description: 咨询师控制层
 * @Version: 1.0
 */
@RestController
@RequestMapping("/fconsultant")
public class ConsultantController {
    @Autowired
    private ConsultantService consultantService;

    /**
     * 后台预约列表显示（预约记录表、用户表、领域表、管理员表、咨询师表）
     * @param vo
     * @return
     */
    @RequestMapping("/getConsultantAndUserAndType")
    public ResponseDto getConsultantAndUserAndType(@RequestBody BookingVo vo){
        return consultantService.getConsultantAndUserAndType(vo);
    }

    /**
     * 修改诊断内容
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentReply")
    public ResponseDto updateAppointmentReply(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentReply(vo);
    }

    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus2")
    public ResponseDto updateAppointmentStatus2(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus2(vo);
    }
    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus3")
    public ResponseDto updateAppointmentStatus3(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus3(vo);
    }
    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus4")
    public ResponseDto updateAppointmentStatus4(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus4(vo);
    }
    /**
     * 修改状态
     * @param vo
     * @return
     */
    @RequestMapping("/updateAppointmentStatus5")
    public ResponseDto updateAppointmentStatus5(@RequestBody BookingVo vo){
        return consultantService.updateAppointmentStatus5(vo);
    }

    /**
     * 获取类型
     * @return
     */
    @RequestMapping("/getType")
    public ResponseDto getType(){
        return consultantService.getTypeAll();
    }

    /**
     * 根据类型id去查询对应记录
     * @param typeId
     * @return
     */
    @RequestMapping("/getPsConsultantAndPsType")
    public ResponseDto getPsConsultantAndPsType(@RequestParam("typeId") Integer typeId){
        return consultantService.getPsConsultantAndPsType(typeId);
    }

    /**
     * 根据id去获取咨询师设置好的时间段
     * @param adminId
     * @return
     */
    @RequestMapping("/getConsultantTime")
    public ResponseDto getConsultantTime(@RequestParam("adminId") Integer adminId){
        return consultantService.getConsultantTime(adminId);
    }

    /**
     * 根据咨询师id去查询咨询师信息
     * @param adminId
     * @return
     */
    @RequestMapping("/getPsConsultantText")
    public ResponseDto getPsConsultantText(@RequestParam("adminId") Integer adminId){
        return consultantService.getPsConsultantText(adminId);
    }
}

